<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS 浮动元素性质</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            width: 200px;
            height: 200px;
            border: 1px solid red;
        }
        div p{
            width: 100px;
            height: 100px;
            background-color: purple;
            float: left;
        }
        div span{
            width: 100px;
            height: 100px;
            background-color: orange;
            float: left;
        }
    </style>
</head>
<body>
    <div>
        <p>我是p标签</p>
        <span>span标签</span>
    </div>
</body>
</html>